Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / feature / docs / src / commonTest / kotlin / org / meshtastic / feature / docs / ui / DocsSearchBarTest.kt

Displaying Raw • Download

feature/docs/src/commonTest/kotlin/org/meshtastic/feature/docs/ui/DocsSearchBarTest.kt fix/qr-error-correction (7b45f84f) Text, 2.42 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.docs.ui

Tff7b72import T7ee787androidx.compose.ui.test.ExperimentalTestApi
Tff7b72import T7ee787androidx.compose.ui.test.assertIsDisplayed
Tff7b72import T7ee787androidx.compose.ui.test.hasSetTextAction
Tff7b72import T7ee787androidx.compose.ui.test.onNodeWithContentDescription
Tff7b72import T7ee787androidx.compose.ui.test.performClick
Tff7b72import T7ee787androidx.compose.ui.test.performTextInput
Tff7b72import T7ee787androidx.compose.ui.test.v2.runComposeUiTest
Tff7b72import T7ee787kotlin.test.Test
Tff7b72import T7ee787kotlin.test.assertEquals

Tf0883e@OptInTb4b4b4(Te6edf3ExperimentalTestApiTff7b72::Te6edf3classTb4b4b4)
Tff7b72class T56d364DocsSearchBarTest Tb4b4b4{

Tf0883e@Test
Tff7b72fun Td2a8ffemptyQuery_clearButtonNotShownTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3runComposeUiTest Tb4b4b4{
Te6edf3setContent Tb4b4b4{ Te6edf3DocsSearchBarTb4b4b4(Te6edf3query Tff7b72= Ta5d6ff"Ta5d6ff"Tb4b4b4, Te6edf3onQueryChange Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4) Tb4b4b4}
Te6edf3onNodeWithContentDescriptionTb4b4b4(Ta5d6ff"Ta5d6ffClear searchTa5d6ff"Tb4b4b4)Tb4b4b4.Te6edf3assertDoesNotExistTb4b4b4(Tb4b4b4)
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8ffnonEmptyQuery_clearButtonShownTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3runComposeUiTest Tb4b4b4{
Te6edf3setContent Tb4b4b4{ Te6edf3DocsSearchBarTb4b4b4(Te6edf3query Tff7b72= Ta5d6ff"Ta5d6ffbluetoothTa5d6ff"Tb4b4b4, Te6edf3onQueryChange Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4) Tb4b4b4}
Te6edf3onNodeWithContentDescriptionTb4b4b4(Ta5d6ff"Ta5d6ffClear searchTa5d6ff"Tb4b4b4)Tb4b4b4.Te6edf3assertIsDisplayedTb4b4b4(Tb4b4b4)
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8ffclearButtonClick_callsOnQueryChangeWithEmptyTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3runComposeUiTest Tb4b4b4{
Tff7b72var Te6edf3receivedTb4b4b4: Tffa657String? Tff7b72= Tff7b72null
Te6edf3setContent Tb4b4b4{ Te6edf3DocsSearchBarTb4b4b4(Te6edf3query Tff7b72= Ta5d6ff"Ta5d6ffbluetoothTa5d6ff"Tb4b4b4, Te6edf3onQueryChange Tff7b72= Tb4b4b4{ Te6edf3received Tff7b72= Tffa657it Tb4b4b4}Tb4b4b4) Tb4b4b4}
Te6edf3onNodeWithContentDescriptionTb4b4b4(Ta5d6ff"Ta5d6ffClear searchTa5d6ff"Tb4b4b4)Tb4b4b4.Te6edf3performClickTb4b4b4(Tb4b4b4)
Te6edf3runOnIdle Tb4b4b4{ Te6edf3assertEqualsTb4b4b4(Ta5d6ff"Ta5d6ff"Tb4b4b4, Te6edf3receivedTb4b4b4) Tb4b4b4}
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8fftextInput_callsOnQueryChangeTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3runComposeUiTest Tb4b4b4{
Tff7b72val Te6edf3queries Tff7b72= Te6edf3mutableListOfTff7b72<Tffa657StringTff7b72>Tb4b4b4(Tb4b4b4)
Te6edf3setContent Tb4b4b4{ Te6edf3DocsSearchBarTb4b4b4(Te6edf3query Tff7b72= Ta5d6ff"Ta5d6ff"Tb4b4b4, Te6edf3onQueryChange Tff7b72= Tb4b4b4{ Te6edf3queries Tff7b72+Tff7b72= Tffa657it Tb4b4b4}Tb4b4b4) Tb4b4b4}
T8b949e// OutlinedTextField placeholder is not findable by text; use semantics matcher
Te6edf3onNodeTb4b4b4(Te6edf3hasSetTextActionTb4b4b4(Tb4b4b4)Tb4b4b4)Tb4b4b4.Te6edf3performTextInputTb4b4b4(Ta5d6ff"Ta5d6ffmeshTa5d6ff"Tb4b4b4)
Te6edf3runOnIdle Tb4b4b4{ Te6edf3assertEqualsTb4b4b4(Ta5d6ff"Ta5d6ffmeshTa5d6ff"Tb4b4b4, Te6edf3queriesTb4b4b4.Te6edf3lastTb4b4b4(Tb4b4b4)Tb4b4b4) Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.08s